using System;
using System.Collections.Generic;
using System.Text;
using AntEater.ComponentModel.BuildElements;

namespace AntEater.Runtime.UI
{
    /// <summary>
    /// Specifies the edit action.
    /// </summary>
    public enum EditAction
    {
        /// <summary>
        /// Copy the element.
        /// </summary>
        Copy = 0,

        /// <summary>
        /// Move the element.
        /// </summary>
        Cut = 1
    }

    /// <summary>
    /// Provides an edit buffer for build elements.
    /// </summary>
    public class EditBuffer
    {

        private IBuildElement _buileElement;

        /// <summary>
        /// Gets or sets the build element.
        /// </summary>
        /// <value>The build element.</value>
        public IBuildElement BuildElement {
            get { return _buileElement; }
            set { _buileElement = value; }
        }

        private EditAction _editAction;

        /// <summary>
        /// Gets or sets the edit action.
        /// </summary>
        /// <value>The edit action.</value>
        public EditAction EditAction {
            get { return _editAction; }
            set { _editAction = value; }
        }

        /// <summary>
        /// Gets a value indicating whether the edit buffer is empty.
        /// </summary>
        /// <value><c>true</c> if the edit buffer is empty; otherwise, <c>false</c>.</value>
        public bool IsEmpty {
            get { return (this.BuildElement == null); }
        }

    }
}
